package model;

// Generated Jun 9, 2011 1:02:18 PM by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

/**
 * OptiuneAjutorfamilie generated by hbm2java
 */
@Entity
@Table(name = "optiune_ajutorfamilie", catalog = "mydb")
public class OptiuneAjutorfamilie implements java.io.Serializable {

	private Integer optiuneAjutorFamilieId;
	private String valoare;
	private Set<Evaluaresociala> evaluaresocialas = new HashSet<Evaluaresociala>(
			0);

	public OptiuneAjutorfamilie() {
	}

	public OptiuneAjutorfamilie(String valoare,
			Set<Evaluaresociala> evaluaresocialas) {
		this.valoare = valoare;
		this.evaluaresocialas = evaluaresocialas;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "optiune_ajutorFamilie_id", unique = true, nullable = false)
	public Integer getOptiuneAjutorFamilieId() {
		return this.optiuneAjutorFamilieId;
	}

	public void setOptiuneAjutorFamilieId(Integer optiuneAjutorFamilieId) {
		this.optiuneAjutorFamilieId = optiuneAjutorFamilieId;
	}

	@Column(name = "valoare", length = 45)
	public String getValoare() {
		return this.valoare;
	}

	public void setValoare(String valoare) {
		this.valoare = valoare;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "evaluaresociala_has_optiune_ajutorfamilie", catalog = "mydb", joinColumns = { @JoinColumn(name = "Optiune_AjutorFamilie_optiune_ajutorFamilie_id", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "EvaluareSociala_evaluare_sociala_id", nullable = false, updatable = false) })
	public Set<Evaluaresociala> getEvaluaresocialas() {
		return this.evaluaresocialas;
	}

	public void setEvaluaresocialas(Set<Evaluaresociala> evaluaresocialas) {
		this.evaluaresocialas = evaluaresocialas;
	}

}
